<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@ include file="../../common/init.jsp"%>
<script type="text/javascript" src="${ctx}/static/00100/javascripts/app.js"></script>
<script type="text/javascript" src="${ctx}/static/00100/javascripts/gopay/express/expressPayChannel.js"></script>

<div class="tabscon"  id="expressPayTab" style="display: none;">
<shiro:notAuthenticated>
    <form id="locationBankFrom" name="locationBankFrom" method="post" action="${ctx}/00100/express/location.shtml?orderKey=<%=request.getParameter("orderKey")%>&orderId=<%=request.getParameter("orderId")%>">
</shiro:notAuthenticated>
<shiro:authenticated>
    <form id="locationBankFrom" name="locationBankFrom" method="post" action="${ctx}/sec/00100/express/confirm.shtml?orderKey=<%=request.getParameter("orderKey")%>&orderId=<%=request.getParameter("orderId")%>">
</shiro:authenticated>
   <c:if test="${!empty expressCardList }">
       <table class="table-tml" id="exCardListDiv">
           <tbody>
           <c:forEach var="card" items="${expressCardList}" varStatus="status">
               <tr>
                   <th>
                       <input type="radio" name="exCardId" id="exCardId_${status.count}" value="${card.cardId}" onclick='exBankSel("${status.count}","${card.exPayChannel}","${card.exPayBankCode}","${card.bankCardNo}");'/>
                       <c:if test="${status.count eq 1}">
                           <input type="hidden"  id="exPayChannel1" name="exPayChannel1" value="${card.exPayChannel}"/>
                           <input type="hidden"  id="exPayBankCode1" name="exPayBankCode1" value="${card.exPayBankCode}"/>
                           <input type="hidden"  id="bankCardNo1" name="bankCardNo1" value="${card.bankCardNo}"/>
                       </c:if>
                   </th>
                   <td>
                       <label for="exCardId_${status.count}">
                           <img src="${ctx}/BankIcon/${card.exPayBankCode}.jpeg"  height='40' style="cursor:pointer;" class="border-gray"/>
                       </label>&nbsp;
                       <span class="color-333 font18">${card.hideBankCardNo}</span>
                       <c:if test="${card.exPayChannel eq '06'}">
                           <span class="btn-1 zoom">信用卡</span>
                       </c:if>
                       <c:if test="${card.exPayChannel eq '03'}">
                           <span class="btn-3 zoom">储蓄卡</span>
                       </c:if>
                       <span class="btn-4 zoom margin0 marginLeft10">快捷</span>
                   </td>
               </tr>
           </c:forEach>
           <tr>
               <td></td>
               <td>
                   <hr style="border:none;border-bottom: 1px solid #d7d7d7">
                   <span class="close-more color-333 marginRight10">折叠银行卡</span>
                   <span class="open-more color-333 marginRight10" style="display: none">展开更多银行卡</span>
                   <span class="color-333 cursor" onclick="changeExCard();">使用其它银行卡</span>
               </td>
               <td  id="selectPayBankTip1" style="display: none">
                   <span class="tips-7 zoom" style="left:146px;top:99px" id="selectPayBankTip11">请选择付款银行</span>
               </td>
           </tr>
           </tbody>
       </table>
   </c:if>
    <table class="table-tml posiRelative" id="firstExpressView" style='display:<c:if test="${!empty expressCardList }">none</c:if> '>
        <tbody>
        <tr>
            <th>银行卡号：</th>
            <td class="posiRelative">
                <div class="fix">
                    <input type="text" class="input-style" style="float: left" id="bankCardNo" name="bankCardNo" maxlength="30"/>
                    <span class="tips-2" id="notSupportTip" style="display: none;left:0px;">不支持该银行，请查看<a href="#" onclick='javascript:$("#notSupportTip").hide();$("#expressBankListDialog2").dialog("open");'>支持的银行</a></span>
                    <span class="tips-2" id="freezeTip" style="display: none;left:0px;"></span>
                    <c:if test="${fn:length(expressCardList) gt 0}">
                         <a href="#" onclick='reUseBindCard();' style="float:left;margin-top:8px;">选择已绑定的快捷卡</a>
                    </c:if>
                </div>
            </td>
        </tr>
        <tr style="display: none" id="payBankTr">
            <th>付款银行：</th>
            <td id="binTd">
                <img id="expressPayBankImg" class="border-gray" height='40'/>
                <span id="expressCardTypeTip"></span>
                <a href="#" onclick='javascript:$("#expressBankListDialog").dialog("open");'>修改</a>
            </td>
            <td id="noBinTd" style="display: none">
                <span class="tips-4 zoom" onclick='javascript:$("#expressBankListDialog").dialog("open");'>请选择付款银行</span>
            </td>

            <td  id="selectPayBankTip2" style="display: none">
                <span class="tips-7 zoom" style="left:146px;top:91px">请选择付款银行</span>
            </td>
        </tr>

        <shiro:notAuthenticated>
            <tr>
                <th></th>
                <td>
                    <span class="">如您已开通快捷支付，请</span><a href="#" onclick="expressSwitchGopay();">登录国付宝</a>
                </td>
            </tr>
        </shiro:notAuthenticated>
        <tr>
            <th>
                <input type="hidden" name="orderId" id="orderId" value="<%=request.getParameter("orderId")%>"/>
                <input type="hidden" name="orderKey" id="orderKey" value="<%=request.getParameter("orderKey")%>"/>
                <input type="hidden" name="formhash" id="formhash" value="${formhash }"/>
                <input type="hidden" name="pageFrom" value="order"/>
                <input type="hidden" name="exPayChannel" id="exPayChannel"/>
                <input type="hidden" name="exPayBankCode" id="exPayBankCode"/>
                <input type="hidden" name="exGopayAcctId" id="exGopayAcctId" value="${gopayAcctId}"/>
                <input type="hidden" name="exPayWay" id="exPayWay" value="F"/>
                <input type="hidden" name="changExCardFlag" id="changExCardFlag"/>
            </th>
            <td>
                <shiro:notAuthenticated>
                    <button type="button" id="submitLocBtn1" class="btn-2" onclick='expressLocationSubmit("0","submitLocBtn1");'>下一步</button>
                </shiro:notAuthenticated>
            </td>
        </tr>
        </tbody>
    </table>
   </form>
    <c:if test="${empty expressCardList }">
        <span class="tips zoom">
            首次开通快捷支付，下次登录国付宝账户<br/>即可使用已绑定的卡快速完成付款。
        </span>
    </c:if>
</div>
<jsp:include page="cardDialog.jsp" flush="true"/>
